import Vue from 'vue'
import Vuex from 'vuex'
import { IAppState } from './modules/app'
import { IPermissionState } from './modules/permission'
import { ISettingsState } from './modules/settings'
import { IUserState } from './modules/user'
Vue.use(Vuex)

export interface IRootState {
  app: IAppState,
  permission: IPermissionState,
  settings: ISettingsState,
  user: IUserState
}
// 由于passenger->dynamic: true: 是动态创建动态模块,所以不需要再次注册
export default new Vuex.Store<IRootState>({
  /*
  Ideally if all your modules are dynamic
  then your store is registered initially
  as a completely empty object
  */
})
